package com.bw.liuyushan.zhuangao4_weektest2.Utils;

import android.content.Context;
import android.util.AttributeSet;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.PagerSnapHelper;
import androidx.recyclerview.widget.RecyclerView;

/**
 * ZhuanGao4_WeekTest2
 * file name is : VideoLayoutManager
 * created by Ender on 2021/8/24 14:40.
 * author : 刘雨杉
 * Describe(作用):
 */
public class VideoLayoutManager extends LinearLayoutManager {
    public VideoLayoutManager(Context context) {
        super(context);
    }

    public VideoLayoutManager(Context context, int orientation, boolean reverseLayout) {
        super(context, orientation, reverseLayout);
    }

    public VideoLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
    }

    @Override
    public void onAttachedToWindow(RecyclerView view) {
        super.onAttachedToWindow(view);
        PagerSnapHelper pagerSnapHelper = new PagerSnapHelper();
        pagerSnapHelper.attachToRecyclerView(view);
    }
}
